<template>
  <el-drawer
    v-model="visible"
    :title="`投坯分组详情`"
    direction="rtl"
    :before-close="handleClose"
  >
    <div class="group-details-item">
      <div style="font-size:26px;font-weight:bold;">
      No.{{record.group_id}}<span :style="{color:record.pd_id==1000?'#606266':'#529b2e'}">【{{record.pd_id==1000?'未投坯':'已投坯'}}】</span>
      </div>
    </div>
    <div class="group-details-item">
      <label>计划号：</label><span>{{record.plan_id}}</span>
    </div>
    <div class="group-details-item">
      <label>产品类型：</label><span>{{ddo.text('prodTypes',record.plan_type)}}</span>
    </div>
    <div class="group-details-item">
      <label>产品客户：</label><span>{{record.cus_name}}</span>
    </div>
    <div class="group-details-item">
      <label>产品规格：</label><span>{{record.std_name}}</span>
    </div>
    <div class="group-details-item">
      <label>产品花色：</label><span>{{record.color_name}}</span>
    </div>
    <div class="group-details-item">
      <label>投坯产量：</label><span>{{record.group_num}}米</span>
    </div>
    <div class="group-details-item">
      <label>分组时间：</label><span>{{record.pn_date}}</span>
    </div>
    <div class="group-details-item">
      <label>操作人：</label><span>{{record.pn_per}}</span>
    </div>
    
  </el-drawer>
</template>

<script setup >
import { reactive, ref ,computed} from "vue";
import { tip, get, post, put, del, ddo,elConfirm } from "@/common";





const visible = ref(false);
const open = (item) => {
  record.value = item;
  visible.value = true;
};
const handleClose = (done) => {
  done();
};

const record = ref({});



const emit = defineEmits(["ok"]); 
const exec = ()=>{
    put('/plan/manager',form,{title:'提示',message:'您确定更新该计划吗？'}).then(result=>{
        emit('ok');
        visible.value = false;
        tip.success('更新成功！');
    });
};

defineExpose({ open });
</script>

<style scoped>
.group-details-item{
  padding:15px 15px;
  border-bottom:1px dashed #DDDDDD;
  margin: 0px 10px;
  font-size:18px;
  display: flex;
  justify-content:space-between;
  color:#606266;
}
.group-details-item>lable{
  width:200px;

}
</style>